#define THIS_FILE "liberer.sqf"
#include <base\tmf_constants.h>
#include <base\tmf_macros.h>
WAITINIT(liberer);

// ["C_man_1_1_F","marker1"] execVM "liberer.sqf";
if (!isServer) exitWith {};
private ["_type","_marker","_freed"];
DEFAULT_PARAM(_type,0,"");
DEFAULT_PARAM(_marker,1,"");
DEFAULT_PARAM(_freed,2,"");
if (_type == "" || _marker == "") exitWith{};

_obj_params = [];
_obj_params set [TMF_VEH_PARAMS_TYPE, _type];
_obj_params set [TMF_VEH_PARAMS_GRP, GVAR(own_side)];
_obj_params set [TMF_VEH_PARAMS_POS, _marker];

_tmf_params = [];
_tmf_params = [_tmf_params,"FREED_MSG",["STR_TYR_TARGET_RESCUED"]] call CFUNC(hashSet);
_tmf_params = [_tmf_params,"DIE_MSG",["STR_TYR_TARGET_RESCUEDIED"]] call CFUNC(hashSet);
_tmf_params = [_tmf_params,"SHARED_FREE_VAR",_freed] call CFUNC(hashSet);
// _tmf_params = [_tmf_params,"SHARED_ALIVE_VAR",""] call CFUNC(hashSet);
// _tmf_params = [_tmf_params,"FREE_CODE",""] call CFUNC(hashSet);
// _tmf_params = [_tmf_params,"DIE_CODE",""] call CFUNC(hashSet);

OBJ = [_obj_params,"HOSTAGE",_tmf_params] call FFUNC(CreateMissionUnit);
